package com.mccken.rapid.core.netty.processor;

import com.mccken.rapid.core.context.HttpRequestWrapper;

import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.FullHttpRequest;

/**
 * 核心流程主执行逻辑
 * 
 * @program: rapid_gateway
 * @description:
 * @author: mccken
 * @create: 2022-01-05 13:33
 **/
public class NettyCoreProcessor implements NettyProcessor {
	@Override
	public void process(HttpRequestWrapper event) {
		FullHttpRequest fullHttpRequest = event.getFullHttpRequest();
		ChannelHandlerContext ctx = event.getCtx();
		
		try {
			// 1. 解析 FullHttpRequest, 转换为我们想要的内部对象：context
			
			// 2. 执行整个过滤器逻辑 FilterChain
			System.out.println("--------接收到http请求--------");
			
			
		} catch (Throwable t) {
			
		}
		
	}

	@Override
	public void start() {

	}

	@Override
	public void shutdown() {

	}
}
